{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Uninstall the Operator and all Feast related objects"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "secret \"feast-data-stores\" deleted\n",
      "featurestore.feast.dev \"example\" deleted\n",
      "namespace \"feast-operator-system\" deleted\n",
      "customresourcedefinition.apiextensions.k8s.io \"featurestores.feast.dev\" deleted\n",
      "serviceaccount \"feast-operator-controller-manager\" deleted\n",
      "role.rbac.authorization.k8s.io \"feast-operator-leader-election-role\" deleted\n",
      "clusterrole.rbac.authorization.k8s.io \"feast-operator-featurestore-editor-role\" deleted\n",
      "clusterrole.rbac.authorization.k8s.io \"feast-operator-featurestore-viewer-role\" deleted\n",
      "clusterrole.rbac.authorization.k8s.io \"feast-operator-manager-role\" deleted\n",
      "clusterrole.rbac.authorization.k8s.io \"feast-operator-metrics-auth-role\" deleted\n",
      "clusterrole.rbac.authorization.k8s.io \"feast-operator-metrics-reader\" deleted\n",
      "rolebinding.rbac.authorization.k8s.io \"feast-operator-leader-election-rolebinding\" deleted\n",
      "clusterrolebinding.rbac.authorization.k8s.io \"feast-operator-manager-rolebinding\" deleted\n",
      "clusterrolebinding.rbac.authorization.k8s.io \"feast-operator-metrics-auth-rolebinding\" deleted\n",
      "service \"feast-operator-controller-manager-metrics-service\" deleted\n",
      "deployment.apps \"feast-operator-controller-manager\" deleted\n",
      "secret \"postgres-secret\" deleted\n",
      "deployment.apps \"postgres\" deleted\n",
      "service \"postgres\" deleted\n",
      "deployment.apps \"redis\" deleted\n",
      "service \"redis\" deleted\n"
     ]
    }
   ],
   "source": [
    "!kubectl delete -f feast.yaml\n",
    "!kubectl delete -f ../../infra/feast-operator/dist/install.yaml\n",
    "!kubectl delete -f postgres.yaml\n",
    "!kubectl delete -f redis.yaml"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Ensure everything has been removed, or is in the process of being terminated."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "No resources found in feast namespace.\n"
     ]
    }
   ],
   "source": [
    "!kubectl get all"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
